<template>
    <div class="photo">
        <div class="background">
            <!-- <h1 class="main-title">博物馆后台管理系统</h1> -->
            <div class="container">
                <div class="register-container">
                    <form @submit.prevent="validateRegister" class="register-form">
                        <h2 class="form-title">注册</h2>
                        <div class="form-group">
                            <label for="registerUsername">用户名</label>
                            <input type="text" id="registerUsername" v-model="registerUsername" placeholder="请输入用户名"
                                required>
                        </div>
                        <div class="form-group">
                            <label for="registerPassword">密码</label>
                            <input type="password" id="registerPassword" v-model="registerPassword" placeholder="请输入密码"
                                required>
                        </div>
                        <div class="form-group">
                            <label for="registerEmail">邮箱</label>
                            <input type="email" id="registerEmail" v-model="registerEmail" placeholder="请输入邮箱" required>
                        </div>
                        <button type="submit" class="register-button">注册</button>
                        <router-link to="/" class="toggle-form">
                            已有账号？登录
                        </router-link>
                    </form>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {

};
</script>

<style scoped>
/* 背景图片 */
.photo {
    background: url('../assets/20220205190306_bc4e6.jpg') no-repeat;
    background-size: cover;
}

/* 背景样式  */
.background {
    height: 97vh;
    /* height: 100%; */
    background: linear-gradient(to bottom right, rgba(237, 109, 145, 0.4), rgba(176, 85, 33, 0.4));
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 表单容器样式 */
.container {
    width: 400px;
    background: rgba(231, 182, 164, 0.8);
    padding: 32px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 注册表单样式 */
.register-container {
    background-color: rgba(243, 218, 218, 0.92);
    border-radius: 8px;
    padding: 0 32px 32px 32px;
}

.form-title {
    text-align: center;
    font-size: 24px;
    color: #333;
}

/* 页面主标题样式 */
.main-title {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    color: #000000;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap
}

/* 注册表单内的布局 */
.register-form {
    display: flex;
    flex-direction: column;
}

/* 表单内每个输入组的样式 */
.form-group {
    margin-bottom: 16px;
}

/* 输入组内标签的样式 */
.form-group label {
    display: block;
    text-align: left;
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
}

/* 输入框的样式 */
.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin-bottom: 16px;
    font-size: 16px;
    box-sizing: border-box;
}

/* 注册按钮的样式 */
.register-button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 20px;
    background-image: linear-gradient(to right, #418cae 0%, #d6bd32 100%);
    color: white;
    cursor: pointer;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

/* 按钮的悬停效果 */
.register-button:hover,
.register-button:focus {
    background-image: linear-gradient(to left, #fa709a 0%, #fee140 100%);
    outline: none;
}

/* 底部切换表单（注册/登录）链接的样式 */
.toggle-form {
    margin-top: 16px;
    text-align: center;
    font-size: 12.8px;
    color: #555;
    cursor: pointer;
}

/* 切换表单链接的悬停效果 */
.toggle-form:hover {
    text-decoration: underline;
}
</style>